Skip to content

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Sep 3, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Kmeakin and others added 25 commits August 15, 2025 01:29
To make changes in table size obvious from git diffs
Include the sizes of the `to_lowercase` and `to_uppercase` tables in the
total size calculations.
The `merge_ranges` function was very complicated and hard to understand.
Forunately, we can use `slice::chunk_by` to achieve the same thing.
Rewrite `generate_tests` to be more idiomatic.
reading through the editorconfig spec, using `!` to negate
an entire glob is simply not a feature.

you can use `!` to negate a charachter class, but that's not
what was going on here.
For `wasm32-wasip2`-and-beyond this tool is required, so in case it's
disabled in `config.toml` add a sanity-check that it's present in the
environment.
This commit is the start of an effort to support WASIp2 natively in the
standard library. Before this commit the `wasm32-wasip2` target behaved
exactly like `wasm32-wasip1` target by importing APIs from the core wasm
module `wasi_snapshot_preview1`. These APIs are satisfied by the
`wasm-component-ld` target by using an [adapter] which implements WASIp1
in terms of WASIp2. This adapter comes at a cost, however, in terms of
runtime indirection and instantiation cost, so ideally the adapter would
be removed entirely. The purpose of this adapter was to provide a
smoother on-ramp from WASIp1 to WASIp2 when it was originally created.

The `wasm32-wasip2` target has been around for long enough now that it's
much more established. Additionally the only thing historically blocking
using WASIp2 directly was implementation effort. Work is now underway to
migrate wasi-libc itself to using WASIp2 directly and now seems as good
a time as any to migrate the Rust standard library too.

Implementation-wise the milestones here are:

* The `wasm32-wasip2` target now also depends on the `wasi` crate at
  version 0.14.* in addition to the preexisting dependency of 0.11.*.
  The 0.14.* release series binds WASIp2 APIs instead of WASIp1 APIs.
* Some preexisting naming around `mod wasi` or `wasi.rs` was renamed to
  `wasip1` where appropriate. For example `std::sys::pal::wasi` is now
  called `std::sys::pal::wasip1`.
* More platform-specific WASI modules are now split between WASIp1 and
  WASIp2. For example getting the current time, randomness, and
  process arguments now use WASIp2 APIs directly instead of using WASIp1
  APIs that require an adapter.

It's worth pointing out that this PR does not migrate the entire
standard library away from using WASIp1 APIs on the `wasm32-wasip2`
target. Everything related to file descriptors and filesystem APIs is
still using WASIp1. Migrating that is left for a future PR. In the
meantime the goal of this change is to lay the groundwork necessary for
migrating in the future. Eventually the goal is to drop the `wasi`
0.11.* dependency on the `wasm32-wasip2` target (the `wasm32-wasip1`
target will continue to retain this dependency).

[adapter]: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-preview1-component-adapter/README.md
The `loongarch64-unknown-none` target is a bare-metal target with
hardware floating-point support and should not enable SIMD extensions
by default. However, LLVM's LoongArch64 backend enables LSX implicitly,
inadvertently activating SIMD instructions for this target. This patch
explicitly disable LSX feature to prevent unintended SIMD usage.
In writing up the reference for frontmatter, I realized that we probably
shouldn't be accepting Unicode Line Ending characters between the code
fence and infostring or trailing after the infostring or a code fence.

In digging into the unicode specification we use for Whitespace, it
divides it up into categories, so I'm deferring to what it says for
horizontal whitespace for what should be used within a line.

Note, I am leaving out support for Unicde Default Ignorable characters.
I figure that can be discussed outside of this change within the
reference and tracking issue.
This upgrades the Rust CI from v6.16-rc1 plus a temporary commit for
the >= 1.91 target spec [1] to v6.17-rc3 with two commits pending to
be merged upstream -- one for the same target spec format change [1]
and another for the `file_as_c_str` change [2].

Link: rust-lang#144443 [1]
Link: rust-lang#145928 [2]
Signed-off-by: Miguel Ojeda <[email protected]>
… r=tgross35

Constify conversion traits (part 1)

This is the first part of rust-lang#144289 being split into smaller pieces. It adds/moves constness of several traits under the `const_convert` feature:

* `From`
* `Into`
* `TryFrom`
* `TryInto`
* `FromStr`
* `AsRef`
* `AsMut`
* `Borrow`
* `BorrowMut`
* `Deref`
* `DerefMut`

There are a few methods that are intrinsically tied to these traits which I've included in the feature. Particularly, those which are wrappers over `AsRef`:

* `ByteStr::new` (unstable under `bstr` feature)
* `OsStr::new`
* `Path::new`

Those which directly use `Into`:

* `Result::into_ok`
* `Result::into_err`

And those which use `Deref` and `DerefMut`:

* `Pin::as_ref`
* `Pin::as_mut`
* `Pin::as_deref_mut`
* `Option::as_deref`
* `Option::as_deref_mut`
* `Result::as_deref`
* `Result::as_deref_mut`

(note: the `Option` and `Result` methods were suggested by ``@npmccallum`` initially as rust-lang#146101)

The parts which are missing from this PR are:

* Anything that involves heap-allocated types
* Making any method const than the ones listed above
* Anything that could rely on the above, *or* could rely on system-specific code for `OsStr` or `Path` (note: this mostly makes these methods useless since `str` doesn't implement `AsRef<OsStr>` yet, but it's better to track the method for now and add impls later, IMHO)

r? ``@tgross35`` (who mostly already reviewed this)
…, r=joshtriplett,tgross35

unicode-table-generator refactors

Split off from rust-lang#145219
…uillaumeGomez

editorconfig: don't use nonexistent syntax

reading through the editorconfig spec, using `!` to negate an entire glob is simply not a feature.

you can use `!` to negate a charachter class, but that's not what was going on here.
…ss35

std: Start supporting WASIp2 natively

This commit is the start of an effort to support WASIp2 natively in the
standard library. Before this commit the `wasm32-wasip2` target behaved
exactly like `wasm32-wasip1` target by importing APIs from the core wasm
module `wasi_snapshot_preview1`. These APIs are satisfied by the
`wasm-component-ld` target by using an [adapter] which implements WASIp1
in terms of WASIp2. This adapter comes at a cost, however, in terms of
runtime indirection and instantiation cost, so ideally the adapter would
be removed entirely. The purpose of this adapter was to provide a
smoother on-ramp from WASIp1 to WASIp2 when it was originally created.

The `wasm32-wasip2` target has been around for long enough now that it's
much more established. Additionally the only thing historically blocking
using WASIp2 directly was implementation effort. Work is now underway to
migrate wasi-libc itself to using WASIp2 directly and now seems as good
a time as any to migrate the Rust standard library too.

Implementation-wise the milestones here are:

* The `wasm32-wasip2` target now also depends on the `wasi` crate at
  version 0.14.* in addition to the preexisting dependency of 0.11.*.
  The 0.14.* release series binds WASIp2 APIs instead of WASIp1 APIs.
* Some preexisting naming around `mod wasi` or `wasi.rs` was renamed to
  `wasip1` where appropriate. For example `std::sys::pal::wasi` is now
  called `std::sys::pal::wasip1`.
* More platform-specific WASI modules are now split between WASIp1 and
  WASIp2. For example getting the current time, randomness, and
  process arguments now use WASIp2 APIs directly instead of using WASIp1
  APIs that require an adapter.

It's worth pointing out that this PR does not migrate the entire
standard library away from using WASIp1 APIs on the `wasm32-wasip2`
target. Everything related to file descriptors and filesystem APIs is
still using WASIp1. Migrating that is left for a future PR. In the
meantime the goal of this change is to lay the groundwork necessary for
migrating in the future. Eventually the goal is to drop the `wasi`
0.11.* dependency on the `wasm32-wasip2` target (the `wasm32-wasip1`
target will continue to retain this dependency).

[adapter]: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-preview1-component-adapter/README.md
…rcote

resolve: Avoid a regression from splitting prelude into two scopes

Fixes rust-lang#145575.
Explicity disable LSX feature for `loongarch64-unknown-none` target

The `loongarch64-unknown-none` target is a bare-metal target with hardware floating-point support and should not enable SIMD extensions by default. However, LLVM's LoongArch64 backend enables LSX implicitly, inadvertently activating SIMD instructions for this target. This patch explicitly disable LSX feature to prevent unintended SIMD usage.
fix(lexer): Only allow horizontal whitespace in frontmatter

In writing up the reference for frontmatter, I realized that we probably
shouldn't be accepting Unicode Line Ending characters between the code
fence and infostring or trailing after the infostring or a code fence.

In digging into the unicode specification we use for Whitespace, it
divides it up into categories, so I'm deferring to what it says for
horizontal whitespace for what should be used within a line.

Note, I am leaving out support for Unicode Default Ignorable characters.
I figure that can be discussed outside of this change within the
reference and tracking issue.

Fixes rust-lang#145971

Frontmatter tracking issue: rust-lang#136889
CI: rfl: move job forward to Linux v6.17-rc3 plus 2 commits

This upgrades the Rust CI from v6.16-rc1 plus a temporary commit for the >= 1.91 target spec [1] to v6.17-rc3 with two commits pending to be merged upstream -- one for the same target spec format change [1] and another for the `file_as_c_str` change [2].

Link: rust-lang#144443 [1]
Link: rust-lang#145928 [2]

r? ``@lqd`` ``@Kobzol``
try-job: x86_64-rust-for-linux
``@rustbot`` label A-rust-for-linux
``@bors`` try
@rustbot rustbot added A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-wasi Operating system: Wasi, Webassembly System Interface labels Sep 3, 2025
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Sep 3, 2025
@Zalathar
Copy link
Contributor Author

Zalathar commented Sep 3, 2025

Subset of #146157.

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Sep 3, 2025

📌 Commit 263048d has been approved by Zalathar

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 3, 2025
@bors
Copy link
Collaborator

bors commented Sep 3, 2025

⌛ Testing commit 263048d with merge fd75a9c...

@bors
Copy link
Collaborator

bors commented Sep 3, 2025

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing fd75a9c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 3, 2025
@bors bors merged commit fd75a9c into rust-lang:master Sep 3, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 3, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#145279 Constify conversion traits (part 1) b7cbb40bbe005a76249e83dbfc9c368c1fc7a50c (link)
#145414 unicode-table-generator refactors 63487767c841723014541961fe9c13516bfac5a5 (link)
#145823 editorconfig: don't use nonexistent syntax 7c2a6ba7dbdc43555505a2664b0017554212ca03 (link)
#145944 std: Start supporting WASIp2 natively 2ccc4fa7084db3d3dce9bbf81d0c313bc824bc4f (link)
#145961 resolve: Avoid a regression from splitting prelude into two… 6a955b261790adce2c3e85da7490ca650aa77a73 (link)
#146032 Explicity disable LSX feature for `loongarch64-unknown-none… e50460bbf5dbaa2cf76c436bd147fe9973fc1b5f (link)
#146106 fix(lexer): Only allow horizontal whitespace in frontmatter 96ef8cbf3b9ef8f285e361273bd7a68d27721b01 (link)
#146154 CI: rfl: move job forward to Linux v6.17-rc3 plus 2 commits dc1c42bbda02f5c640660f4a8e5cab37c216eac7 (link)

previous master: 51ff895062

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Copy link
Contributor

github-actions bot commented Sep 3, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 51ff895 (parent) -> fd75a9c (this PR)

Test differences

Show 2076 test diffs

Stage 1

  • [ui] tests/ui/frontmatter/frontmatter-contains-whitespace.rs: [missing] -> pass (J1)
  • [ui] tests/ui/frontmatter/frontmatter-crlf.rs: [missing] -> pass (J1)
  • [ui] tests/ui/imports/overwritten-extern-flag-ambig.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/frontmatter/frontmatter-contains-whitespace.rs: [missing] -> pass (J0)
  • [ui] tests/ui/frontmatter/frontmatter-crlf.rs: [missing] -> pass (J0)
  • [ui] tests/ui/imports/overwritten-extern-flag-ambig.rs: [missing] -> pass (J0)

Additionally, 2070 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard fd75a9c32d643f39c8c61df770d2cff60b3fefd5 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 3637.7s -> 4386.1s (20.6%)
  2. dist-aarch64-apple: 6425.4s -> 7391.3s (15.0%)
  3. dist-x86_64-apple: 7430.5s -> 8385.0s (12.8%)
  4. dist-arm-linux-musl: 5438.9s -> 6060.9s (11.4%)
  5. dist-various-1: 3803.9s -> 4238.7s (11.4%)
  6. dist-arm-linux-gnueabi: 5389.1s -> 4894.2s (-9.2%)
  7. aarch64-gnu: 7064.2s -> 6489.0s (-8.1%)
  8. dist-various-2: 2165.9s -> 2321.0s (7.2%)
  9. dist-x86_64-netbsd: 4765.1s -> 5095.5s (6.9%)
  10. arm-android: 6126.2s -> 5768.1s (-5.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fd75a9c): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.4%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 1.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary -5.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.5% [-5.5%, -5.5%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.0%, secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.0%] 4
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.0%] 4

Bootstrap: 465.874s -> 466.494s (0.13%)
Artifact size: 388.34 MiB -> 388.33 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. O-wasi Operating system: Wasi, Webassembly System Interface rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.